<%layout("../common/_layout.html", {nav: "留言管理"}) {%>
<div class="result-title">
  <div class="result-list">
    <a href="/admin/message/add">添加留言(测试用)</a>
  </div>
</div>
<div class="result-content">
  <table class="result-tab" width="100%">
    <tr>
      <th width="5%">No.</th>
      <th width="5%">姓名</th>
      <th width="8%">联系电话</th>
      <th width="8%">留言时间</th>
      <th>内容</th>
      <th width="15%">操作</th>
    </tr>
    <%for(message in messagePage.list) {%>
    <tr>
      <td>${messageLP.index}</td>
      <td>${message.name}</td>
      <td>${message.tel}</td>
      <td>${message.create_time, dateFormat="yyyy-MM-dd"}</td>
      <td>${message.content}</td>
      <td>
        <a class="link-update" href="/admin/message/view?id=${message.id }">查看详细</a>&nbsp;
        <a class="link-del" href="/admin/message/delete?id=${message.id }" onclick="return confirm('删除后无法恢复,确定要删除吗')">删除</a>&nbsp;
      </td>
    </tr>
    <%}%>
  </table>
  <%include("../common/_paginate.html", {"currentPage": messagePage.pageNumber, "totalPage": messagePage.totalPage, "totalRow": messagePage.totalRow, "actionUrl": "/admin/message/"}){}%>
</div>
<%}%>